#!/usr/bin/python
import psycopg2
print " import success "
conn = psycopg2.connect(database='testdb',host='localhost',user='postgres',password='postgres')
c=conn.cursor()
print 'get the cursor'
c.execute("select * from tb1")
records = c.fetchall()
import pprint
pprint.pprint(records) 
